
<%@ page import="com.techedge.insidetrack.Tracksession" %>
<!doctype html>
<html>
	<head>
		<meta name="layout" content="main">
		<g:set var="entityName" value="${message(code: 'tracksession.label', default: 'Tracksession')}" />
		<title><g:message code="default.list.label" args="[entityName]" /></title>
	</head>
	<body>
		<a href="#list-tracksession" class="skip" tabindex="-1"><g:message code="default.link.skip.label" default="Skip to content&hellip;"/></a>
		<div class="nav" role="navigation">
			<ul>
				<li><a class="home" href="${createLink(uri: '/')}"><g:message code="default.home.label"/></a></li>
				<li><g:link class="create" action="create"><g:message code="default.new.label" args="[entityName]" /></g:link></li>
			</ul>
		</div>
		<div id="list-tracksession" class="content scaffold-list" role="main">
			<h1><g:message code="default.list.label" args="[entityName]" /></h1>
			<g:if test="${flash.message}">
			<div class="message" role="status">${flash.message}</div>
			</g:if>
			<table>
				<thead>
					<tr>
															
						<g:sortableColumn property="starTime" title="${message(code: 'tracksession.starTime.label', default: 'Time Slot')}" />

						<g:sortableColumn property="description" title="${message(code: 'tracksession.description.label', default: 'Description')}" />
						
						<g:sortableColumn property="tags" title="${message(code: 'tracksession.tags.label', default: 'Tags')}" />
						
						<g:sortableColumn property="hosts" title="${message(code: 'tracksession.hosts.label', default: 'Hosts')}" />
						
					</tr>
				</thead>
				<tbody>
				<g:each in="${tracksessionInstanceList}" status="i" var="tracksessionInstance">
					<tr class="${(i % 2) == 0 ? 'even' : 'odd'}">
					
						<td>
							<g:link action="show" id="${tracksessionInstance.id}"><g:formatDate date="${tracksessionInstance.starTime}" format="hh:mm" /> - <g:formatDate date="${tracksessionInstance.endTime}" format="hh:mm" />
							</g:link>
						</td>
										
						<td>${fieldValue(bean: tracksessionInstance, field: "description")}</td>
						
						<td>${fieldValue(bean: tracksessionInstance, field: "tags")}</td>
						
						<td>
							<g:each in="${tracksessionInstance.hosts}" status="j" var="userInstance">
							${userInstance?.name} <br>
							</g:each>
						</td>
					</tr>
				</g:each>
				</tbody>
			</table>
			<div class="pagination">
				<g:paginate total="${tracksessionInstanceTotal}" />
			</div>
		</div>
	</body>
</html>
